var app = getApp();

Page({
    data: {
        luntext: [ "活动", "标签", "主办方", "场地" ],
        activeIndex: 0
    },
    onLoad: function(t) {
        wx.hideShareMenu();
        var a = wx.getStorageSync("db_tab"), n = app.contains(a, "../myactive/myguanzhu");
        console.log(n), 0 != n && (a[n].color = "selsects", console.log(a)), this.setData({
            yes: n,
            db_tab: a
        }), this.refresh();
    },
    refresh: function(t) {
        var n = this, e = app.today_time(), a = wx.getStorageSync("userInfo").id;
        console.log(a), app.util.request({
            url: "entry/wxapp/MyFollow",
            data: {
                user_id: a
            },
            success: function(t) {
                for (var a in console.log(t), t.data) t.data[a].end_time = app.ormatDate(t.data[a].end_time).slice(0, 16), 
                t.data[a].start_time = app.ormatDate(t.data[a].start_time).slice(0, 16), 1 == t.data[a].is_close ? e >= t.data[a].end_time ? (t.data[a].sign_up = "已结束", 
                t.data[a].sign_state = "sign_over") : e >= t.data[a].start_time ? (t.data[a].sign_up = "进行中", 
                t.data[a].sign_state = "sign_over") : (t.data[a].sign_up = "报名中", t.data[a].sign_state = "sign_up") : (t.data[a].sign_up = "已结束", 
                t.data[a].sign_state = "sign_over");
                n.setData({
                    my_follow: t.data,
                    url: wx.getStorageSync("url")
                });
            }
        });
    },
    tabClick: function(t) {
        this.setData({
            sliderOffset: t.currentTarget.offsetLeft,
            activeIndex: t.currentTarget.id
        });
    },
    jump_activity_info: function(t) {
        console.log(t);
        var a = t.currentTarget.dataset.id;
        wx.navigateTo({
            url: "../activeinfo/activeinfo?id=" + a
        });
    },
    wode: function() {
        var t = this.data.db_tab;
        wx.reLaunch({
            url: t[3].src
        });
    },
    fabu: function() {
        wx.reLaunch({
            url: "../fabu/fabu"
        });
    },
    index: function() {
        var t = this.data.db_tab;
        wx.reLaunch({
            url: t[0].src
        });
    },
    classifination: function(t) {
        var a = this.data.db_tab;
        wx.reLaunch({
            url: a[1].src
        });
    },
    mine_activity: function(t) {
        var a = this.data.db_tab;
        wx.reLaunch({
            url: a[2].src
        });
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {}
});